<?php
require '../../../zb_system/function/c_system_base.php';
require '../../../zb_system/function/c_system_admin.php';

$zbp->Load();
$action='root';
if (!$zbp->CheckRights($action)) {$zbp->ShowError(6);die();}
if (!$zbp->CheckPlugin('Xd_touxiang')) {$zbp->ShowError(48);die();}

$blogtitle='评论随机头像 配置';
$act = "";
if ($_GET['act']){
$act = $_GET['act'] == "" ? 'config' : $_GET['act'];
}

require $blogpath . 'zb_system/admin/admin_header.php';
require $blogpath . 'zb_system/admin/admin_top.php';
?>
<link rel="stylesheet" href="./source/setting.css">
<style type="text/css">.left{display:block; }
.tusername span.ok { background:#004c98; }
.tusername span.not { background:#bbb; }
.tmenu { width:100%; height:40px; line-height:39px; border-top:1px solid #efefef; border-bottom:1px solid #004c98; }
.tmenu li { display:inline-block; vertical-align:top; }
.tmenu li a { padding:0 25px; font-size:16px; color:#333; display:block; }
.tmenu li a:hover { color:#fff; background:#004c98; }
.tmenu li a.on { color:#fff; background:#004c98; }
</style>
<script type="text/javascript" src="./source/setting.js"></script>
<script src="source/jscolor.js" type="text/javascript"></script>
<div class="twrapper">
  <div class="theader">
		<div class="tusername"><span class=ok><?php echo $blogtitle;?></span></div>
    <div class="tmenu">
      <ul>
        <?php Xd_touxiang_SubMenu($act);?>
      </ul>
    </div>
  </div>
  <div class="tmain">
    <?php
if ($act == 'tup'){
if(isset($_POST['txxz'])){
	$zbp->Config('Xd_touxiang')->txxz = $_POST['txxz'];
	}
?>
    <dl>
      <dt>自定义头像上传</dt>
        <dd style="height:80px">
          <label>说明</label>
          上传自定义图片：自定义头像尺寸为：80 x 80 px ；上传后鼠标划过“预”可以预览图片；</dd>
      <dt>静态头像上传&nbsp;&nbsp;--&nbsp;&nbsp;<i style="font-size:14px;color:#bbb;">可以上传10个静态头像!</i></dt>
        <i style="width:100%">
      <form enctype="multipart/form-data" method="post" action="save.php?type=diy1">
        <dd style="width:50%">
          <label>静态头像①</label>
          <input type="file" name="diy1.jpg" class="setfile" />
          <input name="submit" type="submit" class="setbtn" value="上传" />
		  <i class="awarn"><a class="jianjie_toolbar-item jianjie_toolbar-item-app"><i class="fwarn">预</i><span class="toolbar-layer"><i style=" color:#FF0000;"><b>自定义头像尺寸：80 x 80 px；</b></i></br>
          <div class="setimg"><img src="./touxiang/diy/diy1.jpg" /></div></span></a></i> </dd>
        </dd>
      </form>
      <form enctype="multipart/form-data" method="post" action="save.php?type=diy2">
        <dd style="width:50%">
          <label>静态头像②</label>
          <input type="file" name="diy2.jpg" class="setfile" />
          <input name="submit" type="submit" class="setbtn" value="上传" />
		  <i class="awarn"><a class="jianjie_toolbar-item jianjie_toolbar-item-app"><i class="fwarn">预</i><span class="toolbar-layer"><i style=" color:#FF0000;"><b>自定义头像尺寸：80 x 80 px；</b></i></br>
          <div class="setimg"><img src="./touxiang/diy/diy2.jpg" /></div></span></a></i> </dd>
        </dd>
      </form></i> 
        <i style="width:100%">
      <form enctype="multipart/form-data" method="post" action="save.php?type=diy3">
        <dd style="width:50%">
          <label>静态头像③</label>
          <input type="file" name="diy3.jpg" class="setfile" />
          <input name="submit" type="submit" class="setbtn" value="上传" />
		  <i class="awarn"><a class="jianjie_toolbar-item jianjie_toolbar-item-app"><i class="fwarn">预</i><span class="toolbar-layer"><i style=" color:#FF0000;"><b>自定义头像尺寸：80 x 80 px；</b></i></br>
          <div class="setimg"><img src="./touxiang/diy/diy3.jpg" /></div></span></a></i> </dd>
        </dd>
      </form>
      <form enctype="multipart/form-data" method="post" action="save.php?type=diy4">
        <dd style="width:50%">
          <label>静态头像④</label>
          <input type="file" name="diy4.jpg" class="setfile" />
          <input name="submit" type="submit" class="setbtn" value="上传" />
		  <i class="awarn"><a class="jianjie_toolbar-item jianjie_toolbar-item-app"><i class="fwarn">预</i><span class="toolbar-layer"><i style=" color:#FF0000;"><b>自定义头像尺寸：80 x 80 px；</b></i></br>
          <div class="setimg"><img src="./touxiang/diy/diy4.jpg" /></div></span></a></i> </dd>
        </dd>
      </form></i> 
        <i style="width:100%">
      <form enctype="multipart/form-data" method="post" action="save.php?type=diy5">
        <dd style="width:50%">
          <label>静态头像⑤</label>
          <input type="file" name="diy5.jpg" class="setfile" />
          <input name="submit" type="submit" class="setbtn" value="上传" />
		  <i class="awarn"><a class="jianjie_toolbar-item jianjie_toolbar-item-app"><i class="fwarn">预</i><span class="toolbar-layer"><i style=" color:#FF0000;"><b>自定义头像尺寸：80 x 80 px；</b></i></br>
          <div class="setimg"><img src="./touxiang/diy/diy5.jpg" /></div></span></a></i> </dd>
        </dd>
      </form>
      <form enctype="multipart/form-data" method="post" action="save.php?type=diy6">
        <dd style="width:50%">
          <label>静态头像⑥</label>
          <input type="file" name="diy6.jpg" class="setfile" />
          <input name="submit" type="submit" class="setbtn" value="上传" />
		  <i class="awarn"><a class="jianjie_toolbar-item jianjie_toolbar-item-app"><i class="fwarn">预</i><span class="toolbar-layer"><i style=" color:#FF0000;"><b>自定义头像尺寸：80 x 80 px；</b></i></br>
          <div class="setimg"><img src="./touxiang/diy/diy6.jpg" /></div></span></a></i> </dd>
        </dd>
      </form></i> 
        <i style="width:100%">
      <form enctype="multipart/form-data" method="post" action="save.php?type=diy7">
        <dd style="width:50%">
          <label>静态头像⑦</label>
          <input type="file" name="diy7.jpg" class="setfile" />
          <input name="submit" type="submit" class="setbtn" value="上传" />
		  <i class="awarn"><a class="jianjie_toolbar-item jianjie_toolbar-item-app"><i class="fwarn">预</i><span class="toolbar-layer"><i style=" color:#FF0000;"><b>自定义头像尺寸：80 x 80 px；</b></i></br>
          <div class="setimg"><img src="./touxiang/diy/diy7.jpg" /></div></span></a></i> </dd>
        </dd>
      </form>
      <form enctype="multipart/form-data" method="post" action="save.php?type=diy8">
        <dd style="width:50%">
          <label>静态头像⑧</label>
          <input type="file" name="diy8.jpg" class="setfile" />
          <input name="submit" type="submit" class="setbtn" value="上传" />
		  <i class="awarn"><a class="jianjie_toolbar-item jianjie_toolbar-item-app"><i class="fwarn">预</i><span class="toolbar-layer"><i style=" color:#FF0000;"><b>自定义头像尺寸：80 x 80 px；</b></i></br>
          <div class="setimg"><img src="./touxiang/diy/diy8.jpg" /></div></span></a></i> </dd>
        </dd>
      </form></i> 
        <i style="width:100%">
      <form enctype="multipart/form-data" method="post" action="save.php?type=diy9">
        <dd style="width:50%">
          <label>静态头像⑨</label>
          <input type="file" name="diy9.jpg" class="setfile" />
          <input name="submit" type="submit" class="setbtn" value="上传" />
		  <i class="awarn"><a class="jianjie_toolbar-item jianjie_toolbar-item-app"><i class="fwarn">预</i><span class="toolbar-layer"><i style=" color:#FF0000;"><b>自定义头像尺寸：80 x 80 px；</b></i></br>
          <div class="setimg"><img src="./touxiang/diy/diy9.jpg" /></div></span></a></i> </dd>
        </dd>
      </form>
      <form enctype="multipart/form-data" method="post" action="save.php?type=diy10">
        <dd style="width:50%">
          <label>静态头像⑩</label>
          <input type="file" name="diy10.jpg" class="setfile" />
          <input name="submit" type="submit" class="setbtn" value="上传" />
		  <i class="awarn"><a class="jianjie_toolbar-item jianjie_toolbar-item-app"><i class="fwarn">预</i><span class="toolbar-layer"><i style=" color:#FF0000;"><b>自定义头像尺寸：80 x 80 px；</b></i></br>
          <div class="setimg"><img src="./touxiang/diy/diy10.jpg" /></div></span></a></i> </dd>
        </dd>
      </form></i> 
      <dt>动态头像上传&nbsp;&nbsp;--&nbsp;&nbsp;<i style="font-size:14px;color:#bbb;">可以上传10个动态头像!</i></dt>
        <i style="width:100%">
      <form enctype="multipart/form-data" method="post" action="save.php?type=diy11">
        <dd style="width:50%">
          <label>动态头像①</label>
          <input type="file" name="diy11.gif" class="setfile" />
          <input name="submit" type="submit" class="setbtn" value="上传" />
		  <i class="awarn"><a class="jianjie_toolbar-item jianjie_toolbar-item-app"><i class="fwarn">预</i><span class="toolbar-layer"><i style=" color:#FF0000;"><b>自定义头像尺寸：80 x 80 px；</b></i></br>
          <div class="setimg"><img src="./touxiang/diy/diy11.gif" /></div></span></a></i> </dd>
        </dd>
      </form>
      <form enctype="multipart/form-data" method="post" action="save.php?type=diy12">
        <dd style="width:50%">
          <label>动态头像②</label>
          <input type="file" name="diy12.gif" class="setfile" />
          <input name="submit" type="submit" class="setbtn" value="上传" />
		  <i class="awarn"><a class="jianjie_toolbar-item jianjie_toolbar-item-app"><i class="fwarn">预</i><span class="toolbar-layer"><i style=" color:#FF0000;"><b>自定义头像尺寸：80 x 80 px；</b></i></br>
          <div class="setimg"><img src="./touxiang/diy/diy12.gif" /></div></span></a></i> </dd>
        </dd>
      </form></i> 
        <i style="width:100%">
      <form enctype="multipart/form-data" method="post" action="save.php?type=diy13">
        <dd style="width:50%">
          <label>动态头像③</label>
          <input type="file" name="diy13.gif" class="setfile" />
          <input name="submit" type="submit" class="setbtn" value="上传" />
		  <i class="awarn"><a class="jianjie_toolbar-item jianjie_toolbar-item-app"><i class="fwarn">预</i><span class="toolbar-layer"><i style=" color:#FF0000;"><b>自定义头像尺寸：80 x 80 px；</b></i></br>
          <div class="setimg"><img src="./touxiang/diy/diy13.gif" /></div></span></a></i> </dd>
        </dd>
      </form>
      <form enctype="multipart/form-data" method="post" action="save.php?type=diy14">
        <dd style="width:50%">
          <label>动态头像④</label>
          <input type="file" name="diy14.gif" class="setfile" />
          <input name="submit" type="submit" class="setbtn" value="上传" />
		  <i class="awarn"><a class="jianjie_toolbar-item jianjie_toolbar-item-app"><i class="fwarn">预</i><span class="toolbar-layer"><i style=" color:#FF0000;"><b>自定义头像尺寸：80 x 80 px；</b></i></br>
          <div class="setimg"><img src="./touxiang/diy/diy14.gif" /></div></span></a></i> </dd>
        </dd>
      </form></i> 
        <i style="width:100%">
      <form enctype="multipart/form-data" method="post" action="save.php?type=diy15">
        <dd style="width:50%">
          <label>动态头像⑤</label>
          <input type="file" name="diy15.gif" class="setfile" />
          <input name="submit" type="submit" class="setbtn" value="上传" />
		  <i class="awarn"><a class="jianjie_toolbar-item jianjie_toolbar-item-app"><i class="fwarn">预</i><span class="toolbar-layer"><i style=" color:#FF0000;"><b>自定义头像尺寸：80 x 80 px；</b></i></br>
          <div class="setimg"><img src="./touxiang/diy/diy15.gif" /></div></span></a></i> </dd>
        </dd>
      </form>
      <form enctype="multipart/form-data" method="post" action="save.php?type=diy16">
        <dd style="width:50%">
          <label>动态头像⑥</label>
          <input type="file" name="diy16.gif" class="setfile" />
          <input name="submit" type="submit" class="setbtn" value="上传" />
		  <i class="awarn"><a class="jianjie_toolbar-item jianjie_toolbar-item-app"><i class="fwarn">预</i><span class="toolbar-layer"><i style=" color:#FF0000;"><b>自定义头像尺寸：80 x 80 px；</b></i></br>
          <div class="setimg"><img src="./touxiang/diy/diy16.gif" /></div></span></a></i> </dd>
        </dd>
      </form></i> 
        <i style="width:100%">
      <form enctype="multipart/form-data" method="post" action="save.php?type=diy17">
        <dd style="width:50%">
          <label>动态头像⑦</label>
          <input type="file" name="diy17.gif" class="setfile" />
          <input name="submit" type="submit" class="setbtn" value="上传" />
		  <i class="awarn"><a class="jianjie_toolbar-item jianjie_toolbar-item-app"><i class="fwarn">预</i><span class="toolbar-layer"><i style=" color:#FF0000;"><b>自定义头像尺寸：80 x 80 px；</b></i></br>
          <div class="setimg"><img src="./touxiang/diy/diy17.gif" /></div></span></a></i> </dd>
        </dd>
      </form>
      <form enctype="multipart/form-data" method="post" action="save.php?type=diy18">
        <dd style="width:50%">
          <label>动态头像⑧</label>
          <input type="file" name="diy18.gif" class="setfile" />
          <input name="submit" type="submit" class="setbtn" value="上传" />
		  <i class="awarn"><a class="jianjie_toolbar-item jianjie_toolbar-item-app"><i class="fwarn">预</i><span class="toolbar-layer"><i style=" color:#FF0000;"><b>自定义头像尺寸：80 x 80 px；</b></i></br>
          <div class="setimg"><img src="./touxiang/diy/diy18.gif" /></div></span></a></i> </dd>
        </dd>
      </form></i> 
        <i style="width:100%">
      <form enctype="multipart/form-data" method="post" action="save.php?type=diy19">
        <dd style="width:50%">
          <label>动态头像⑨</label>
          <input type="file" name="diy19.gif" class="setfile" />
          <input name="submit" type="submit" class="setbtn" value="上传" />
		  <i class="awarn"><a class="jianjie_toolbar-item jianjie_toolbar-item-app"><i class="fwarn">预</i><span class="toolbar-layer"><i style=" color:#FF0000;"><b>自定义头像尺寸：80 x 80 px；</b></i></br>
          <div class="setimg"><img src="./touxiang/diy/diy19.gif" /></div></span></a></i> </dd>
        </dd>
      </form>
      <form enctype="multipart/form-data" method="post" action="save.php?type=diy20">
        <dd style="width:50%">
          <label>动态头像⑩</label>
          <input type="file" name="diy20.gif" class="setfile" />
          <input name="submit" type="submit" class="setbtn" value="上传" />
		  <i class="awarn"><a class="jianjie_toolbar-item jianjie_toolbar-item-app"><i class="fwarn">预</i><span class="toolbar-layer"><i style=" color:#FF0000;"><b>自定义头像尺寸：80 x 80 px；</b></i></br>
          <div class="setimg"><img src="./touxiang/diy/diy20.gif" /></div></span></a></i> </dd>
        </dd>
      </form></i> 
    </dl>
    <?php
}
if ($act == 'jbsz'){
if(isset($_POST['huiyuan'])){
	$zbp->Config('Xd_touxiang')->huiyuan = $_POST['huiyuan'];
	$zbp->Config('Xd_touxiang')->kg = $_POST['kg'];
	$zbp->Config('Xd_touxiang')->txxz = $_POST['txxz'];
	$zbp->Config('Xd_touxiang')->jtxz = $_POST['jtxz'];
	$zbp->Config('Xd_touxiang')->diyjtxz = $_POST['diyjtxz'];
	$zbp->Config('Xd_touxiang')->s = $_POST['s'];
	$zbp->Config('Xd_touxiang')->dd = $_POST['dd'];
	$zbp->Config('Xd_touxiang')->d = $_POST['d'];
	$zbp->Config('Xd_touxiang')->r = $_POST['r'];
	$zbp->Config('Xd_touxiang')->check = $_POST['check'];
	$zbp->Config('Xd_touxiang')->default_url = $_POST['default_url'];
	$zbp->SaveConfig('Xd_touxiang');
	$zbp->ShowHint('good');
}
?>
    <form name="seo" method="post" class="setting">
      <dl>
        <dt>基本配置</dt>
        <i style="width:100%">
		<dd style="width:50%">
          <label for="d">评论随机图片</label>
			<select name="d" id="d">
				<option value="local_rg"<?php if($zbp->Config('Xd_touxiang')->d=='local_rg'){echo 'selected="selected"';}?>>开启随机头像</option>
				<option value="local_g"<?php if($zbp->Config('Xd_touxiang')->d=='local_g'){echo 'selected="selected"';}?>>系统默认头像</option>
			</select>
          <i class="warn">></i><span class="warncon">评论随机图片配置；</br>开启随机头像和系统默认头像两种选择；</span><i class="warnb">|</i></dd>
		<dd style="width:50%">
          <label>网站会员图片</label>
          <input type="text" id="huiyuan" name="huiyuan" class="checkbox" value="<?php echo $zbp->Config('Xd_touxiang')->huiyuan;?>" />
          <i class="warn">></i><span class="warncon">“ON”：为优先调用注册会员的本地图片；</span><i class="warnb">|</i></dd></i>
        <i style="width:100%">
		<dd class="half"  style="width:33.33%">
			<label for="txxz">随机头像选择</label>
			<select name="txxz" id="txxz">
				<option value="a"<?php if($zbp->Config('Xd_touxiang')->txxz=='a'){echo 'selected="selected"';}?>>静态头像</option>
				<option value="b"<?php if($zbp->Config('Xd_touxiang')->txxz=='b'){echo 'selected="selected"';}?>>动态头像</option>
				<option value="c"<?php if($zbp->Config('Xd_touxiang')->txxz=='c'){echo 'selected="selected"';}?>>自定义头像</option>
			</select>
          <i class="warn">></i><span class="warncon">随机头像选择，</br>分静态头像、动态头像和自定义头像三种选择；</span><i class="warnb">|</i></dd>
		<dd class="half"  style="width:33.33%">
			<label for="jtxz">静态头像</label>
			<select name="jtxz" id="jtxz">
				<option value="a"<?php if($zbp->Config('Xd_touxiang')->jtxz=='a'){echo 'selected="selected"';}?>>男性头像</option>
				<option value="b"<?php if($zbp->Config('Xd_touxiang')->jtxz=='b'){echo 'selected="selected"';}?>>女性头像</option>
				<option value="c"<?php if($zbp->Config('Xd_touxiang')->jtxz=='c'){echo 'selected="selected"';}?>>男女混合头像</option>
			</select>
          <i class="warn">></i><span class="warncon">随机静态头像选择，</br>分静态头像和动态头像两种选择；</span><i class="warnb">|</i></dd>
		<dd class="half"  style="width:33.33%">
			<label for="diyjtxz">自定义头像</label>
			<select name="diyjtxz" id="diyjtxz">
				<option value="a"<?php if($zbp->Config('Xd_touxiang')->diyjtxz=='a'){echo 'selected="selected"';}?>>静态头像</option>
				<option value="b"<?php if($zbp->Config('Xd_touxiang')->diyjtxz=='b'){echo 'selected="selected"';}?>>动态头像</option>
			</select>
          <i class="warn">></i><span class="warncon">随机静态头像选择，</br>分男性头像和女性头像两种选择；</span><i class="warnb">|</i></dd></i>
        <i style="display:none;">
          <input type="text" name="s" id="s" style="display:none;" class="settext" value="<?php echo $zbp->Config('Xd_touxiang')->s;?>" />
          <input type="text" name="dd" id="dd" style="display:none;" class="settext" value="<?php echo $zbp->Config('Xd_touxiang')->dd;?>" />
          <input type="text" name="r" id="r" style="display:none;" class="settext" value="<?php echo $zbp->Config('Xd_touxiang')->r;?>" />
          <input type="text" name="check" style="display:none;" id="check" class="checkbox" value="<?php echo $zbp->Config('Xd_touxiang')->check;?>" />
          <input type="text" name="default_url" style="display:none;" id="default_url" class="settext" value="<?php echo $zbp->Config('Xd_touxiang')->default_url;?>" /></i>
        <dd class="setok">
          <input name="submit" type="submit" class="setbtn" value="保存设置" />
          <img id="statloading" src="source/loading.gif" alt="" /></dd>
      </dl>
    </form>
    </dl>
    <?php
}
?>
  </div>
</div>
<script type="text/javascript">ActiveTopMenu("topmenu_Xd_touxiang");</script>
<?php
require $blogpath . 'zb_system/admin/admin_footer.php';
RunTime();
?>